#ifndef __SUM_H_
#define __SUM_H_

class CNotify {
public:
   virtual void OnResult(int retCode){};
};

class CSum {
public:
   static CSum * NewSum(){
        return new CSum();
   };
public:
    int add(int a, int b) {
        return a + b;
    };
public:
   void RegSpi(CNotify *p) {
        _p = p;
        p->OnResult(50);
   }
private:
    CNotify *_p;
};

#endif